
<?php Yii::app()->clientScript->registerScript('list', <<<DOCHERE

   
 
    Ext.onReady(function(){
        var store=Ext.create('Ext.data.Store',{
            model:'Dispatchdetails',
            pageSize:20,
            autoLoad:true,
            proxy:{
                type:'ajax',
                url:'index.php?r=dispatch/list',
                reader:{
                    type:'json',
                    root:'data',
                    totalProperty:'totalCount'
                }
            }
        })
        Ext.create('Ext.ux.LiveSearchGridPanel',{
            store:store,
            height: 450,
            width: grid_width,
            title: 'Dispatch List',
            renderTo: 'dispatch-list',
            viewConfig: {
                stripeRows: true
            },
          
            bbar: new Ext.PagingToolbar({
                pageSize: 20,
                store:store,
                displayInfo: true,
                displayMsg: 'Displaying topics {0} - {1} of {2}',
                emptyMsg: 'No topics to display'

            }),
            columns:[
                {
                    text:'Dispatch',
                    flex:1,
                    renderer:function(value,p,record){
                        return Ext.String.format('<a href="index.php?r=dispatchdetails/update&dispatch={0}">{0}</a>',record.data.dispatch);
                    }
                },
                {
                    text:'Customer',
                    flex:1,
                    dataIndex:'custno'
                    
                },
                {
                    text:'Address',
                    flex:1,
                    dataIndex:'custAdd'
                },
                {
                    text:'City',
                    flex:1,
                    dataIndex:'custCity'
                },
                {
                    text:'State',
                    flex:1,
                    dataIndex:'custState'                    
                },    
                {
                    text:'Task',
                    flex:1,
                    dataIndex:'task'
                },
                {
                    text:'Status',
                    flex:1,
                    dataIndex:'techStatus'
                },
                {
                    text:'Actions',
                    flex:1,
                    renderer:function(value,p,record){
                        return Ext.String.format('<a href="index.php?r=dispatchdetails/update&dispatch={0}"><img src="images/update.png"/></a><a href="index.php?r=dispatchdetails/delete&dispatch={0}"><img src="images/delete.png"/></a>',record.data.dispatch  );
                    }
                }
            ]

        });
    });
DOCHERE
        , CClientScript::POS_BEGIN); ?>

<div id="left-col">
    <div class="wrap">
        <div class="inside"></div>
    </div>



</div>

<div id="right-col">

    <div class="wrap">
        <div class="container">


            <div id="breadcrumb" style="display:none;"><span style="padding-left:10px;font-size:10px;color:#777777;" id="alsoviewing"></span></div>
            <div class="inside">

          
         




                <div id="dispatch-list">

                </div>

            </div><!-- inside -->
        </div><!-- container -->
    </div><!-- wrap -->
<?php $this->renderPartial('/copyright'); ?>
</div> <!-- left-col -->